home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
gamesrc
/
tictac
/
mouse.asm
< prev
next >
Wrap
Assembly Source File
|
1995-06-08
|
2KB
|
87 lines
; int SetUpMouse(void)
; void ShowMouse(void)
; void HideMouse(void)
; void MoveMouse(unsigned int x, unsigned int y)
; void SetMouseBounds(int x1,int y1,int x2,int y2)
.model LARGE ; not to worry about size of data
.CODE
PUBLIC _SetUpMouse
PUBLIC _HideMouse
PUBLIC _MoveMouse
PUBLIC _ShowMouse
PUBLIC _SetMouseBounds
_SetUpMouse proc far
push bp
mov bp,sp
xor ax, ax
int 33h ; init mouse driver
cmp ax, 0
je nomouse ; if ax 0 then mouse not supported
mov cx, 16
mov dx, 600
mov ax, 07h
int 33h ; define horisontal boundary
mov cx, 11
mov dx, 193
mov ax, 08
int 33h ; define vertical boundary
jmp exit
nomouse:
xor ax,ax
jmp short exit2
exit:
mov ax,1
exit2:
pop bp
ret
_SetUpMouse endp
_ShowMouse proc far
push bp
mov bp,sp
mov ax, 1
int 33h
pop bp
ret
_ShowMouse endp
_HideMouse proc far
push bp
mov bp,sp
mov ax, 2
int 33h
pop bp
ret
_HideMouse endp
_MoveMouse proc far
push bp
mov bp,sp
mov ax, 4
mov cx, [bp+4]
mov dx, [bp+6]
int 33h
pop bp
ret
_MoveMouse endp
_SetMouseBounds proc far
push bp
mov bp,sp
mov cx, [bp+6]
mov dx, [bp+10]
mov ax, 07h
int 33h
mov cx, [bp+8]
mov dx, [bp+12]
mov ax, 08
int 33h
pop bp
ret
_SetMouseBounds endp
END